Conventionally, in a technical field of moving image compression, there are often a band limitation in a transmission path through which compressed data passes and a size limitation in a compressed data storage area. Thus, a bit-rate control for compressing a moving image into compressed data smaller than a predetermined data size is important. In one example of such bit-rate control, the amount of generated data, i.e., the amount of code, is adjusted by controlling a quantization width for each unit of processing when performing compression processing. A parameter that indicates a quantization width is called Quantization Parameter (hereinafter referred to as “QP”).
Constant Bit Rate (CBR) control is a typical bit-rate control, in which the amount of generated code is nearly a constant for each unit of processing. Incidentally, an image includes an area of complicated picture and an area of simple picture, and the former has a high compression difficulty and the latter has a low compression difficulty. In the CBR control, the same amount of code is allocated to the area of complicated picture and the area of simple picture. Therefore, a sufficient amount of code is allocated for the area of simple picture; however, the amount of code is not sufficient for the area of complicated picture. Due to this, in the area of complicated picture in an image, degradation of video quality occurs locally.
There is a method in which QP is selected such that an average value of the amount of code generated for each unit of processing does not exceeds a target amount of code per unit of processing when compressing each unit of processing. Also, there is a feedback method in which the amount of code allocated to the unit of processing to be processed next is determined from a difference between the amount of generated code and the target amount of code per unit of processing when compressing each unit of processing.
For example, JP-A 2008-42943 discloses an image compression encoding apparatus which selects either a compression method using a selected QP or a compression method with a lower compression rate for each encoding unit, taking into account the amounts of code generated by quantizing data using a plurality of different QPs and the amount of code generated by the compression method with a lower compression rate.